GtkPopover: Honor widget margins when calculating tail position
authorCarlos Garnacho <carlosg@gnome.org>
Tue, 21 Jun 2016 10:24:05 +0000 (12:24 +0200)
committerCarlos Garnacho <carlosg@gnome.org>
Tue, 21 Jun 2016 15:54:42 +0000 (17:54 +0200)
commited227f9e7b7be4b3558ea9b7f8cdbf83e69f71ef
tree607fecf57f40122866bb50751a8c85ecad50c75f
parent3724592efb87567691d47e6f02a7cfb2dc014a3d
GtkPopover: Honor widget margins when calculating tail position

If there are widget margins set, the whole popover will be displaced.
However the calculation of the tail position doesn't have this into
account, ending up with the tail being detached from the popover if
the margin grew too big.

We should not render the arrows invariably next to the GdkWindow edge,
but optionally displaced inside it depending on the widget margins.
Fixes the gtk3-demo "Popovers" demo case, whose GtkEntry popovers set
widget margins for some reason.

https://bugzilla.gnome.org/show_bug.cgi?id=767851
gtk/gtkpopover.c